import i18n from '@src/locales';
import FormSubMaterialsSetting from './FormSubMaterialsSetting.vue';
import FormSubMaterialsPreview from './FormSubMaterialsPreview.vue';
import FormSubMaterialsBuild from './FormSubMaterialsBuild.vue';
import FormSubMaterialsView from './FormSubMaterialsView.vue';

import FormRelatedFieldsBuild from './FormRelatedFieldsBuild.vue';

let FormSubMaterials = {
  formType: 'subMaterials', // 字段类型
  fieldName: 'subMaterials',
  name: i18n.t('common.fields.materialsBill.displayName'),
  previewIcon: 'icon-richeng',
  isSystem: 1,
  forceDelete: true,
  subFormFieldList: () => {
    return []
  },
  isSubForm: true,
  component: {
    preview: FormSubMaterialsPreview,
    build: FormSubMaterialsBuild,
    view: FormSubMaterialsView,
    setting: FormSubMaterialsSetting,
  }
};

const FormMaterialsItem = {
  formType: 'materialRelatedFields',
  name: i18n.t('common.form.preview.material.label2'),
  component: {
    build: FormRelatedFieldsBuild
  }
}
export default [FormSubMaterials, FormMaterialsItem];
